<template>
  <el-dialog
    v-model="addRouterDialogVisible"
    title="添加一级路由"
    width="500px"
    class="add-router-box"
    :before-close="CancelFUnc"
  >
    <el-form :model="addForm" label-width="auto" label-position="left">
      <el-form-item label="是否显示在导航栏：">
        <el-radio-group v-model="addForm.show">
          <el-radio :label="1" size="large">显示</el-radio>
          <el-radio :label="2" size="large">隐藏</el-radio>
        </el-radio-group>
      </el-form-item>
      <el-form-item label="名称：">
        <el-input class="input-box" v-model="addForm.name" />
      </el-form-item>
      <el-form-item label="接口路径：">
        <el-input class="input-box" v-model="addForm.name" />
      </el-form-item>
      <el-form-item label="vue-path：">
        <el-input class="input-box" v-model="addForm.name" />
      </el-form-item>
      <el-form-item label="vue-component：">
        <el-input class="input-box" v-model="addForm.name" />
      </el-form-item>
      <el-form-item label="图标：">
        <el-input class="input-box" v-model="addForm.name" />
      </el-form-item>
      <el-form-item label="排序：">
        <el-input class="input-box" v-model="addForm.name" />
      </el-form-item>
    </el-form>
    <template #footer>
      <div class="dialog-footer">
        <el-button @click="CancelFUnc">取消</el-button>
        <el-button type="primary" @click="CancelFUnc">添加</el-button>
      </div>
    </template>
  </el-dialog>
</template>
<script setup>
import {
  computed,
  watch,
  onMounted,
  getCurrentInstance,
  ref,
  defineEmits,
  nextTick,
} from 'vue'
const { proxy: that } = getCurrentInstance()
const props = defineProps({
  show: {
    type: Boolean,
    default: () => {
      return false
    },
  },
  tableData: {
    type: Array,
    default: () => {
      return []
    },
  },
})

let addForm = ref({
  show: 1,
})
let addRouterDialogVisible = ref(false)
watch(
  () => props.show,
  (newValue, oldValue) => {
    addRouterDialogVisible.value = props.show
  }
)
const emit = defineEmits(['onClose'])
const CancelFUnc = () => {
  emit('onClose', false)
}
const SubmitFUnc = () => {}
</script>
<style lang="scss">
@import './store_dislog.scss';
</style>